Skip to content

EscalationCondition.php: Set default operator value#511

Merged
BastianLedererIcinga merged 1 commit into
mainfrom
fix/escalation-rule-incindent-age-operator-submission
Jul 15, 2026
Merged

EscalationCondition.php: Set default operator value#511
BastianLedererIcinga merged 1 commit into
mainfrom
fix/escalation-rule-incindent-age-operator-submission

Conversation

@sukhwinder33445

Copy link
Copy Markdown
Contributor

For the incident_age column, the operator select is disabled and only offers a single option (>). Disabled HTML selects don't submit a value, so the operator was previously missing from the submitted data and form could not be submitted. Defaulting the element's value to the first available option ensures it's always set, even while disabled.

@cla-bot cla-bot Bot added the cla/signed CLA is signed by all contributors of a PR label Jul 15, 2026
For the `incident_age` column, the `operator` select is disabled and
only offers a single option (`>`). Disabled HTML selects don't submit
a value, so the operator was previously missing from the submitted
data and form could not be submitted. Defaulting the element's value
to the first available option ensures it's always set, even while
disabled.
@sukhwinder33445
sukhwinder33445 force-pushed the fix/escalation-rule-incindent-age-operator-submission branch from 3c12071 to b096fb7 Compare July 15, 2026 07:04
@sukhwinder33445 sukhwinder33445 self-assigned this Jul 15, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a form-submission edge case in the escalation condition configuration: when the incident_age column is selected, the operator <select> is disabled (and thus not submitted by the browser), causing the required operator value to be missing on submit.

Changes:

  • Set a default value for the operator select to the first available operator option (array_key_first($operators)), ensuring an operator is always present even when the field is disabled.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@BastianLedererIcinga
BastianLedererIcinga merged commit 9e79ee2 into main Jul 15, 2026
14 checks passed
@BastianLedererIcinga
BastianLedererIcinga deleted the fix/escalation-rule-incindent-age-operator-submission branch July 15, 2026 07:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla/signed CLA is signed by all contributors of a PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants